package com.uphone.magicleafteacher.pro.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.uphone.magicleafteacher.R;
import com.uphone.magicleafteacher.util.CommonUtil;
import com.uphone.magicleafteacher.view.MyBaseViewHolder;
import com.uphone.magicleafteacher.vo.BookBorrowingBean;

public class BookBorrowingDetailAdapter extends BaseQuickAdapter<BookBorrowingBean.FollowWorkBean.FinishedStudentsBean, MyBaseViewHolder> {
    public BookBorrowingDetailAdapter() {
        super(R.layout.layout_item_detail);
    }

    @Override
    protected void convert(MyBaseViewHolder helper, BookBorrowingBean.FollowWorkBean.FinishedStudentsBean item) {
        helper.setText(R.id.tv_title, "学员   " + CommonUtil.getStr(item.getStudentName()) + "   跟读已完成")
                .setTextColor(R.id.tv_state, item.getRemarkStatus() == 2 ? mContext.getResources().getColor(R.color.themecolor) : mContext.getResources().getColor(R.color.red))
                .setText(R.id.tv_state, item.getRemarkStatus() == 2 ? "已批改" : "未批改")
                .setText(R.id.tv_time, CommonUtil.getStr(item.getSubmitTime()));

    }
}
